fuse3: fix build warning in fuse_signals.c
authorGeorgi Valkov <[email protected]>
Thu, 12 Jun 2025 05:28:04 +0000 (08:28 +0300)
committerRobert Marko <[email protected]>
Mon, 23 Jun 2025 08:26:34 +0000 (10:26 +0200)
BT_STACK_SZ and backtrace_buffer are not used when
HAVE_BACKTRACE is undefined. Wrap them in #ifdef
to avoid a build warning:

../lib/fuse_signals.c:31:14: warning: 'backtrace_buffer' defined but not used [-Wunused-variable]
   31 | static void *backtrace_buffer[BT_STACK_SZ];
      |              ^~~~~~~~~~~~~~~~

[1] https://github.com/libfuse/libfuse/pull/1245

Signed-off-by: Georgi Valkov <[email protected]>
utils/fuse3/Makefile
utils/fuse3/patches/100-fuse_signals.c-fix-build-warning-when-HAVE_BACKTRACE.patch [new file with mode: 0644]

index d7ee9869407423ec17cd526022e4e96585346bfa..9a518f08883a273b65618f6e9f87e34f9e421d18 100644 (file)
@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=fuse3
 PKG_VERSION:=3.17.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=fuse-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/libfuse/libfuse/releases/download/fuse-$(PKG_VERSION)
diff --git a/utils/fuse3/patches/100-fuse_signals.c-fix-build-warning-when-HAVE_BACKTRACE.patch b/utils/fuse3/patches/100-fuse_signals.c-fix-build-warning-when-HAVE_BACKTRACE.patch
new file mode 100644 (file)
index 0000000..0fbc7ab
--- /dev/null
@@ -0,0 +1,31 @@
+From: Georgi Valkov <[email protected]>
+Date: Thu, 12 Jun 2025 07:36:14 +0300
+Subject: [PATCH] fuse_signals.c: fix build warning when HAVE_BACKTRACE is
+ undefined
+
+BT_STACK_SZ and backtrace_buffer are not used when
+HAVE_BACKTRACE is undefined. Wrap them in #ifdef
+to avoid a build warning:
+
+../lib/fuse_signals.c:31:14: warning: 'backtrace_buffer' defined but not used [-Wunused-variable]
+   31 | static void *backtrace_buffer[BT_STACK_SZ];
+      |              ^~~~~~~~~~~~~~~~
+
+Signed-off-by: Georgi Valkov <[email protected]>
+---
+ lib/fuse_signals.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/lib/fuse_signals.c
++++ b/lib/fuse_signals.c
+@@ -27,8 +27,10 @@ static int ignore_sigs[] = { SIGPIPE};
+ static int fail_sigs[] = { SIGILL, SIGTRAP, SIGABRT, SIGBUS, SIGFPE, SIGSEGV };
+ static struct fuse_session *fuse_instance;
++#ifdef HAVE_BACKTRACE
+ #define BT_STACK_SZ (1024 * 1024)
+ static void *backtrace_buffer[BT_STACK_SZ];
++#endif
+ static void dump_stack(void)
+ {